package com.llb.llbliving.commodity.controller;

import com.llb.common.utils.PageUtils;
import com.llb.llbliving.commodity.entity.SkuInfoEntity;
import com.llb.llbliving.commodity.service.SkuInfoService;
import com.llb.llbliving.commodity.vo.SearchResult;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Controller
public class SearchController {
    @Resource
    private SkuInfoService skuInfoService;
    @RequestMapping("/list.html")
    public String searchList(@RequestParam Map<String,Object> params, Model model){

        //分页查询
        SearchResult searchResult = skuInfoService.querySearchPageByCondition(params);

        model.addAttribute("result",searchResult);
        return "list";
    }
}
